package docmodel;

/**
 * 
 * @author andrea
 *
 */
public class XDPTool {

	/**
	 * 
	 */
	private static void config_Marker() {
		
		//Marker.INSTANCE.setPattern(  );
	}
	
	/**
	 * 
	 */
	private static void config_DbConnection() {
		
		//DbUtils.INSTANCE.setServer();
		//DbUtils.INSTANCE.setCredentials();			//prendile da un file properties
	}
	
	/**
	 * 
	 */
	private static void config_XDPfiles() {
	
		 
	}
	
	/**
	 * 
	 * @param args
	 */
	public static void main(String[] args) 
	{
		//P
		System.out.println("Usage: java -jar convertXFA source.xdp destination.xdp");
		
		if(args.length<2) {
			for(String arg: args) 
				System.out.print(" - "+arg);
			System.exit(2);
			return;
		}
		
		//CONFIGURATION / INIT
		config_DbConnection();			// 1
		config_XDPfiles();				// 2
		config_Marker();
		
		//
		String inputFile = args[0]; //"prova.xdp";
		String outputFile = args[1]; //"simpleout.xdp"
		
		//
		XDP_Reader reader = new XDP_Reader(inputFile);		
		reader.run();
		reader.save(outputFile);
		
		//P  
		System.out.println("Completato");
	}
}
